<template>
	<view class="wrap">
		<view class="content" v-html="parseRichText(form.info2)">
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {
					info2: '',
				},
			}
		},
		mounted() {
			this.initPage();
		},
		methods: {
			// 格式化img标签，避免img超出页面
			parseRichText(html) {
				if (html) {
					let arr = html.split('<img');
					html = arr.join('<img width=100%');
				}
				return html;
			},
			initPage(){
				// #ifdef H5
				this.$nextTick(function() {
				// #endif
					this.getData();
				// #ifdef H5
				})
				// #endif
			},
			// 应用详情
			getData(){
				vk.callFunction({
						url: this.$api.AppInfo,
						loading: true,
						data: {
							appid: vk.getVuex('$app.appInfo.appId')
						},
					})
					.then(res => {
						this.form = res.item
					})
			},
		}
	}
</script>

<style scoped>
	.content{
		margin: 0 auto 24rpx;
		font-size: 14px;
		/* letter-spacing: 1px;
		text-indent: 2em; */
	}
	img{
		width: 100%;
	}
</style>